package com.myappengine.model;

import java.util.HashSet;
import java.util.Set;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class Clazz {
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	
	@Persistent
	private String classId;
	
	@Persistent
	private String className;
	
	@Persistent
	private Set<Key> students = new HashSet<Key>();
	
	public Clazz() {
		
	}
	
	public Clazz(String classId, String className) {
		this.classId = classId;
		this.className = className;
	}
	
	public Clazz(String classId, String className, Set<Key> students) {
		this(classId, className);
		this.students = students;
	}

	public Set<Key> getStudents() {
		return students;
	}

	public void setStudents(Set<Key> students) {
		this.students = students;
	}

	public String getClassId() {
		return classId;
	}

	public void setClassId(String classId) {
		this.classId = classId;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public Key getKey() {
		return key;
	}
}
